// Copyright (c) 2017-2025 Tencent. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//    http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package v20221123

import (
    tcerr "github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/errors"
    tchttp "github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/http"
    "github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/json"
)

type CloudDedicatedZoneResourceStatisticsInfo struct {
	// Specifies the item name of resource statistics.
	Item *string `json:"Item,omitnil,omitempty" name:"Item"`

	// Resource statistics item measurement unit.
	Unit *string `json:"Unit,omitnil,omitempty" name:"Unit"`

	// Total resource amount.
	Total *string `json:"Total,omitnil,omitempty" name:"Total"`

	// Used resources.
	Usage *string `json:"Usage,omitnil,omitempty" name:"Usage"`

	// Specifies the percentage of used resources.
	UsageRate *string `json:"UsageRate,omitnil,omitempty" name:"UsageRate"`

	// Remaining resource.
	Remain *string `json:"Remain,omitnil,omitempty" name:"Remain"`

	// Remaining resource percentage.
	RemainRate *string `json:"RemainRate,omitnil,omitempty" name:"RemainRate"`

	// Resource utilization rate at midnight this monday.
	ThisMondayUsageRate *string `json:"ThisMondayUsageRate,omitnil,omitempty" name:"ThisMondayUsageRate"`

	// Resource growth rate this week.
	ThisMondayUsageGrowthRate *string `json:"ThisMondayUsageGrowthRate,omitnil,omitempty" name:"ThisMondayUsageGrowthRate"`

	// Resource growth rate last week.
	LastMondayUsageGrowthRate *string `json:"LastMondayUsageGrowthRate,omitnil,omitempty" name:"LastMondayUsageGrowthRate"`
}

type CloudDedicatedZoneResourceSummaryInfo struct {
	// Product name
	ProductName *string `json:"ProductName,omitnil,omitempty" name:"ProductName"`

	// Subproduct name
	SubProductName *string `json:"SubProductName,omitnil,omitempty" name:"SubProductName"`

	// Statistical detail of the resource.
	Statistics []*CloudDedicatedZoneResourceStatisticsInfo `json:"Statistics,omitnil,omitempty" name:"Statistics"`
}

// Predefined struct for user
type DescribeCloudDedicatedZoneResourceSummaryRequestParams struct {
	// Unique id of the cloud dedicated zone.
	CdzId *string `json:"CdzId,omitnil,omitempty" name:"CdzId"`
}

type DescribeCloudDedicatedZoneResourceSummaryRequest struct {
	*tchttp.BaseRequest
	
	// Unique id of the cloud dedicated zone.
	CdzId *string `json:"CdzId,omitnil,omitempty" name:"CdzId"`
}

func (r *DescribeCloudDedicatedZoneResourceSummaryRequest) ToJsonString() string {
    b, _ := json.Marshal(r)
    return string(b)
}

// FromJsonString It is highly **NOT** recommended to use this function
// because it has no param check, nor strict type check
func (r *DescribeCloudDedicatedZoneResourceSummaryRequest) FromJsonString(s string) error {
	f := make(map[string]interface{})
	if err := json.Unmarshal([]byte(s), &f); err != nil {
		return err
	}
	delete(f, "CdzId")
	if len(f) > 0 {
		return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeCloudDedicatedZoneResourceSummaryRequest has unknown keys!", "")
	}
	return json.Unmarshal([]byte(s), &r)
}

// Predefined struct for user
type DescribeCloudDedicatedZoneResourceSummaryResponseParams struct {
	// Resource utilization.
	ResourceSummarySet []*CloudDedicatedZoneResourceSummaryInfo `json:"ResourceSummarySet,omitnil,omitempty" name:"ResourceSummarySet"`

	// Extended information of resource utilization.
	ExtraInfo *ExtraInfo `json:"ExtraInfo,omitnil,omitempty" name:"ExtraInfo"`

	// The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
	RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
}

type DescribeCloudDedicatedZoneResourceSummaryResponse struct {
	*tchttp.BaseResponse
	Response *DescribeCloudDedicatedZoneResourceSummaryResponseParams `json:"Response"`
}

func (r *DescribeCloudDedicatedZoneResourceSummaryResponse) ToJsonString() string {
    b, _ := json.Marshal(r)
    return string(b)
}

// FromJsonString It is highly **NOT** recommended to use this function
// because it has no param check, nor strict type check
func (r *DescribeCloudDedicatedZoneResourceSummaryResponse) FromJsonString(s string) error {
	return json.Unmarshal([]byte(s), &r)
}

type ExtraInfo struct {
	// Cloud dedicated zone local time this monday date.
	ThisMondayLocalDate *string `json:"ThisMondayLocalDate,omitnil,omitempty" name:"ThisMondayLocalDate"`

	// Cloud dedicated zone local time last monday date.
	LastMondayLocalDate *string `json:"LastMondayLocalDate,omitnil,omitempty" name:"LastMondayLocalDate"`
}